<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 粉丝语音识别消息详情
     */
    function detailEventInfo(id,wxName) {
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/wx/fansMessage/voiceIdentify/getVoiceIdentifyMessageInfoObject.sjson",
            data: {voiceIdentifyMessageInfoId: id,wxName:wxName},
            success: function (result) {
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
				/**设置展示信息**/
                $("#d_wxName").html(data.wxName);
                $("#d_publicNumberName").html(data.wxVoiceIdentifyMessageInfo.publicNumberName);
                $("#d_mediaId").html(data.wxVoiceIdentifyMessageInfo.mediaId);
                $("#d_formatEnumId").html(data.wxVoiceIdentifyMessageInfo.format);
                if(data.wxVoiceIdentifyMessageInfo.voiceUrl !=undefined && data.wxVoiceIdentifyMessageInfo.voiceUrl !=""){
                    $("#d_voiceUrl").attr("href", "${uploadPath}/" + data.wxVoiceIdentifyMessageInfo.voiceUrl);
                }
                $("#d_recognition").html(data.wxVoiceIdentifyMessageInfo.recognition);
                var tt=new Date(parseInt(data.wxVoiceIdentifyMessageInfo.createTime) * 1000);
                var mon=tt.getMonth();
                if(mon<10){
                    mon="0"+mon;
                }
                if(data.wxVoiceIdentifyMessageInfo.createTime!=""&&data.wxVoiceIdentifyMessageInfo.createTime!=undefined){
                    $("#d_createTime").html(new Date(data.wxVoiceIdentifyMessageInfo.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                if(data.wxVoiceIdentifyMessageInfo.replyFlag=="0"){
                    $("#d_replyFlag").html("<font class='color_002'>否</font>");
                }else{
                    $("#d_replyFlag").html("<font class='color_001'>是</font>");
                }
                if(data.wxVoiceIdentifyMessageInfo.replyFlagTime!=undefined && data.wxVoiceIdentifyMessageInfo.replyFlagTime!=""){
                    $("#d_replyFlagTime").html(toJsonDate(data.wxVoiceIdentifyMessageInfo.replyFlagTime,"yyyy-MM-dd hh:mm:ss"));
                }
            }
        });
    }
</script>
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">粉丝语音识别消息详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">公众号名称:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_publicNumberName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">粉丝会员名:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_wxName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">语音消息媒体ID:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_mediaId"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">语音格式:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_formatEnumId"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">语音文件:</td><td class="toleft_td">&nbsp;&nbsp;
							<a id="d_voiceUrl" href="javascript:" >点击查看语音源文件</a>
						</td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">语音识别结果:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_recognition"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">是否回复:</td><td class="toleft_td">&nbsp;&nbsp;<span id="d_replyFlag"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">创建时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="100px">回复时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_replyFlagTime"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>